package com.zt.ztlibrary.adapter;

import android.support.v7.widget.RecyclerView;

import java.util.List;

/**
 * 作者:zt
 * 时间:on 18/12/26
 * 说明: RecyclerView 通用适配器
 */
public abstract class AbstractZTAdapter extends RecyclerView.Adapter<ZTViewHolder> {

    @Override
    public final void onBindViewHolder(ZTViewHolder holder, int position) {
        holder.bind(getItem(position));
    }

    public abstract Object getItem(int position);

    public abstract List<?> getData();

    public abstract AbstractZTAdapter updateData(List<?> data);
}
